<h1 id="named-checkzone">named-checkzone</h1>
<p>使用named-checkzone命令可以进行区域文件有效性检查和转换，必须指定区域名称和区域文件名称。</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>named-checkzone命令</strong> 可以进行区域文件有效性检查和转换，必须指定区域名称和区域文件名称。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">named-checkzone [选项] [区域名] [区域文件名]</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-q 安静模式
-d 启用调试
-c &lt;类别&gt; 指定区域的类别。如果没指定就使用IN</code></pre>
<h3 id="例子">例子</h3>
<p>对区域文件/var/named/192.168.0.rev进行有效性检查和转换。</p>
<div class="sourceCode" id="cb3"><pre><code class="language-bash"><a class="sourceLine" id="cb3-1" data-line-number="1">[<span class="ex">root@localhost</span> ~]# named-checkzone 0.168.192.in-addr.arpa /var/named/192.168.0.rev</a>
<a class="sourceLine" id="cb3-2" data-line-number="2"><span class="ex">zone0.168.192.in-addr.arpa</span>/IN: <span class="ex">loaded</span> serial 1268360612</a>
<a class="sourceLine" id="cb3-3" data-line-number="3"><span class="ex">OK</span></a></code></pre></div>
<p>对区域文件/var/named/sh.com.hosts进行有效性检查和转换。</p>
<div class="sourceCode" id="cb4"><pre><code class="language-bash"><a class="sourceLine" id="cb4-1" data-line-number="1">[<span class="ex">root@localhost</span> ~]#  named-checkzone sh.com /var/named/sh.com.hosts</a>
<a class="sourceLine" id="cb4-2" data-line-number="2"><span class="ex">zonesh.com</span>/IN: <span class="ex">sh.com/MX</span> <span class="st">&#39;mail.sh.com&#39;</span> is a CNAME (illegal)</a>
<a class="sourceLine" id="cb4-3" data-line-number="3"><span class="ex">zonesh.com</span>/IN: <span class="ex">loaded</span> serial 1268360234</a>
<a class="sourceLine" id="cb4-4" data-line-number="4"><span class="ex">OK</span></a></code></pre></div>
<!-- Linux命令行搜索引擎：https://jaywcjlove.github.io/linux-command/ -->
